package com.soft.javase.day06.datetime.student;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;

/**
 * @author yzh
 * @desc TODO
 * @date 2025/4/24
 */
public class Student {
    private String name;
    private String id;
    private LocalDate birthDate;

    public Student(String name, String id, LocalDate birthDate) {
        this.name = name;
        this.id = id;
        this.birthDate = birthDate;
    }

    public void display() {
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
        System.out.println("Student{" +
                "name='" + name + '\'' +
                ", id='" + id + '\'' +
                ", birthDate=" + formatter.format(birthDate) +
                '}');
    }

    public String getName() {
        return name;
    }

    public LocalDate getBirthDate() {
        return birthDate;
    }
}
